﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Yqd.Models
{
    public class Yqd_Department
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int DepartmentID { get; set; }

        [StringLength(50)]
        [Required]
        public string OrganizationCode { get; set; }

        [Required(ErrorMessage = "请输入部门名称")]
        [StringLength(200)]
        [DisplayName("部门名称")]
        public string Name { get; set; }

        [StringLength(50)]
        public string ParentCode { get; set; }

        [StringLength(50)]
        public string TypeCode { get; set; }

        [StringLength(50)]
        public string TypeName { get; set; }

        public bool isLeaf { get; set; }

        [StringLength(50)]
        public string InstitutionLevelCode { get; set; }

        [StringLength(50)]
        public string InstitutionLevelName { get; set; }
    }
}
